import $ from '../common';
Page({
  data: {
    titleHeight: $.gData().titleHeight,
    statuHeight: $.gData().statuHeight,
    // form: {},
    teacherinfo: {}
  },
  //去往教师资格证
  goteaCer() {
    const {qualification}=this.data.teacherinfo
    $.navigateTo(`/my/upload?tiile=教师资格证&field=qualification&imgs=${JSON.stringify(qualification)}`) 

  },
  //去往荣誉证书
  gohoncer() {
    const {certificate}=this.data.teacherinfo
    $.navigateTo(`/my/upload?tiile=各类证书&field=certificate&imgs=${JSON.stringify(certificate)}`)

  },
  // 去往我的信息
  Modifymyinfo() {
    $.navigateTo(`/my/myinfoner`)
  },
  // 去往个人简介
  goMySynopsis() {
    $.navigateTo(`/my/synopsis?title=个人简介&field=summary&ner=${this.data.teacherinfo.summary}`)
  },
  //去往教学成果
  goTeaching() {
    $.navigateTo(`/my/synopsis?title=教学成果&field=profit&ner=${this.data.teacherinfo.profit}`)
  },
  //去往履历
  gorecord() {
    $.navigateTo(`/my/synopsis?title=填写履历&field=resume&ner=${this.data.teacherinfo.resume}`)
  },
  //去往设置
  goSetupThe() {
    $.navigateTo(`/my/setupthe`)
  },
  // 去往反馈
  feedbackhand() {
    $.navigateTo(`/setting/feedback`)
  },
  //获取用户账号
  getuserinfo() {
    $.get("/teacher/detail", {}, (res) => {
      this.setData({
        teacherinfo: res.teacher
      })
    })
  },
  onLoad(e) {},
  onShow() {
    this.getuserinfo()
  },
})